package com.cup.wx.statemachine;

import org.springframework.statemachine.annotation.OnTransition;
import org.springframework.statemachine.annotation.WithStateMachine;
 
/** 
*/
@WithStateMachine
public class EventConfig {
 
    @OnTransition(target = "UNPAID")
    public void create() {
       System.out.println("-------a 订单创建，待支付");
    }
 
    @OnTransition(source = "UNPAID", target = "WAITING_FOR_RECEIVE")
    public void pay() {
       System.out.println("---------a 用户完成支付，待收货");
    }
 
    @OnTransition(source = "WAITING_FOR_RECEIVE", target = "DONE")
    public void receive() {
       System.out.println("---------a 用户已收货，订单完成");
    }
}